<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <input type="text" class="txt">
    <div class="box1"></div>

    <div class="app">
        <div>{{ str }}</div>
        <input type="text" v-model="str">
        <span>{{str}}</span>
    </div>
</body>
<script src="https://lib.baomitu.com/vue/2.7.7/vue.js"></script>
<script>

    // let str = "hello";
    
    // const txt = document.querySelector(".txt");
    // const box1 = document.querySelector(".box1");

    // txt.value = str;
    // box1.innerHTML = str;

    // txt.oninput = function(){
    //     box1.innerHTML = this.value;
    //     str = this.value
    // }



    const vm = new Vue({
        el:".app",
        data:{
            str: "hello Vue"
        }
    })

</script>
</html>